import Vue from 'vue'
//引入vuex
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
  //等同于data
  state: {
    count: 0,
    num:[],
  },
  //等同于methods
  mutations: {
    bb(state,a){
      state.count++
      state.num.push(a)
    }
  }
})
